package com.example.demo.dao;

import com.example.demo.entity.StudentBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface StudentDao {
    
    List<StudentBean> getAll();
    
    Integer insert(StudentBean studentBean);
    
    Integer edit(StudentBean studentBean);
    
    Integer del(Integer id);
    
    StudentBean getOne(Integer id);
    
    StudentBean getByUsername(String username);
    
    List<StudentBean> getPage(
            @Param("jump") Integer jump,
            @Param("pageSize") Integer pageSize,
            @Param("name") String name,
            @Param("school") String school,
            @Param("sortOrder") String sortOrder
    );
    
    Integer getCount(
            @Param("name") String name,
            @Param("school") String school
    );
}
